const SERVER = "https://service-noqt654d-1307637143.sh.apigw.tencentcs.com:443"
// const SERVER = "http://localhost:8888"

export const UserApi = {
  loginByPassword: SERVER + '/user/login/password',
  loginByCode: SERVER + '/user/login/code',
  refresh: SERVER + '/user/refresh',
  verifyEmail: SERVER + "/user/verify/email",

  getMineInfo: SERVER + '/user/info',
  getMineRank: SERVER + '/user/rank',
  getUserInfo: SERVER + '/user/info/email',
  changeUserInfo: SERVER + '/user/info',
  firstLogin: SERVER + '/user/login/first',
  changePassword:  SERVER + '/user/password',
  peReq : SERVER + '/user/pe',
  peGet : SERVER + '/user/pe',
  peGetAll : SERVER + '/user/pe/all',
  peApp : SERVER + '/user/pe/app'
}

export const ProblemApi = {
  getProblemById : SERVER + '/pro',
  getAll : SERVER + '/pro/all',
  getByTags : SERVER + '/pro/tags',
  getHot :SERVER + '/pro/hot',
  getIO : SERVER + '/pro/io',
  addOrUpdate : SERVER + '/pro'
}

export const SolutionApi = {
  getSolutionById : SERVER + "/solution",
  getAllSolutionByPid : SERVER + "/solution/all",
  addSolution : SERVER + "/solution",
  getRealAll : SERVER + '/solution/all/all',
  delById : SERVER + '/solution/rem',
  adminEdit : SERVER + '/solution/adm/edit'
}

export const MessageApi = {
  getById : SERVER + '/msg',
  getAll : SERVER + '/msg/page',
  readById : SERVER + '/msg/read',
  deleteById : SERVER + '/msg/del'
}

export const RecordApi = {
  getById : SERVER + '/record',
  getAll : SERVER + '/record/user',
  submit : SERVER + '/record',
  getStatusById : SERVER + '/record/status',
  geySuccessStatistic :SERVER + '/record/user/statistic'
}

export const AskApi = {
  getById : SERVER + '/ask',
  getAll : SERVER + '/ask/all',
  getAllReplies : SERVER + '/ask/replies',
  addAsk : SERVER + '/ask',
  addReply : SERVER + '/ask/replies',
  removeAsk : SERVER + '/ask/amd/rem',
  removeReply : SERVER + '/ask/adm/replies/rem',
  editAsk : SERVER + '/ask/adm/edit'
}
